﻿using System.Data;

namespace Smatime.Web.Models
{
    public class ListStaffWorkAtStore : BaseEntity
    {
        public long StoreID { get; set; }
        public string StaffName { get; set; }
        public string StoreName { get; set; }
        //public DateTime? CheckIn { get; set; }
        public string CheckIn { get; set; }
        public string CheckOut { get; set; }

        public override BaseEntity FromDataRow(DataRow row)
        {
            Id = (long) row["Id"];
            StoreID = (long) row["StoreId"];
            StaffName = row["StaffName"].ToString();
            StoreName = row["StoreName"].ToString();
            CheckIn = row["CheckIn"].ToString();
            CheckOut = row["CheckOut"].ToString();
            //this.CheckOut = (row["CheckOut"].ToString() == "") ? (DateTime?)null : ((DateTime)row["CheckOut"]);
            return base.FromDataRow(row);
        }

        public override void ToDataRow(DataRow row)
        {
            base.ToDataRow(row);
        }
    }
}